<template>
	<view class="propose">
		<view class="wrap column-center">
			<view style="width: 100%;">
				感谢您写下宝贵的建议，也是我们进步的动力！
			</view>
			<textarea v-model="value" placeholder="请输入内容"></textarea>
			<u-button size="medium" type="warning" shape="circle" @click="onSubmit()">提交</u-button>
		</view>
	</view>
</template>

<script>
	import {
		addProposal
	} from '@/api/user'
	export default {
		data() {
			return {
				value: ""
			};
		},
		methods: {
			onSubmit() {
				addProposal({
					content: this.value
				}).then((res) => {
					this.$toast({
						title: '提交成功'
					});
					this.value = ""
				})
			}
		}
	}
</script>

<style lang="scss">
	.propose {
		position: relative;
		font-size: 28rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;

		&::before,
		&::after {
			content: '';
			position: fixed;
			z-index: 19;
			top: 0;
			width: 100%;
			height: 20rpx;
			background-color: #FFCC46;
		}

		&::after {
			background-color: #fff;
			border-radius: 40rpx 40rpx 0 0;
		}

		.wrap {
			padding: 40rpx 24px;
			width: 100%;
		}

		textarea {
			width: 100%;
			padding: 24rpx;
			margin: 24rpx 0 64rpx;
			background: #F7F7F7;
			border-radius: 20rpx;
			box-sizing: border-box;
		}
	}
</style>
